# $Id$
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgname=gnome-autoar
pkgver=0.2.2
pkgrel=1
pkgdesc="Automatic archives creating and extracting library"
arch=('i686' 'x86_64')
license=('LGPL')
url="https://wiki.gnome.org/TingweiLan/GSoC2013Final"
depends=('glib2' 'libarchive' 'gtk3')
makedepends=('intltool' 'git' 'gobject-introspection' 'gnome-common' 'gtk-doc' 'vala')
_commit=2c40b322ac38507545adaaac9ddecec4ff354279  # tags/0.2.2^0
source=("git+https://git.gnome.org/browse/gnome-autoar#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
